<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      li {
        width: 200px;
        cursor: pointer;
      }
      .inner {
        display: none;
      }
    </style>
  </head>
  <body>
    <ul>
      <li>
        <a class="fristA" href="">一级标题</a>
        <ul class="inner">
          <li><a href="">二级标题</a></li>
          <li><a href="">二级标题</a></li>
          <li><a href="">二级标题</a></li>
        </ul>
      </li>
      <li><a href="">一级标题</a></li>
      <li><a href="">一级标题</a></li>
    </ul>
  </body>
  <script>
    var fristA = document.querySelector(".fristA");
    var oUl = document.querySelector(".inner");
    var Ali = document.querySelectorAll("li");
    var aA = document.querySelectorAll("inner a");
    fristA.onclick = function (ev) {
      ev.preventDefault();
      oUl.style.display = "block";
    };
  </script>
</html>
